import { $t } from "/@/plugins/i18n";
import type { RouteConfigsTable } from "/#/index";
const Layout = () => import("/@/layout/index.vue");

const mesRoute: RouteConfigsTable = {
  path: "/mes",
  name: "mes",
  component: Layout,
  meta: {
    icon: "ep-management",
    title: '生产',
    rank: 1
  },
  children: [
    {
      path: '/mes/work-order',
      name: 'work-order',
      component: () => import('./work-order/index.vue'),
      meta: {
        title: '工单',
      }
    },
    // {
    //   path: '/mes/mrp',
    //   name: 'mrp',
    //   component: () => import('./mrp/index.vue'),
    //   meta: {
    //     title: 'MRP计算',
    //     keepAlive: true
    //   }
    // },
    {
      path: '/mes/craft',
      name: 'craft',
      component: () => import('./craft/index.vue'),
      meta: {
        title: '工艺修改',
      }
    },
    {
      path: '/mes/process',
      name: 'process',
      component: () => import('./process/index.vue'),
      meta: {
        title: '工序',
      }
    },
    {
      path: '/mes/product',
      name: 'product',
      component: () => import('./product/index.vue'),
      meta: {
        title: '产品',
      }
    },
    {
      path: '/mes/equipment',
      name: 'equipment',
      component: () => import('./equipment/index.vue'),
      meta: {
        title: '设备',
      }
    },
  ]
};

const feedback: RouteConfigsTable = {
  path: "/mes/feedback",
  name: "feedback",
  component: Layout,
  meta: {
    icon: "ep-promotion",
    title: '生产报工',
    rank: 2
  },
  children: [
    {
      path: '/mes/feedback/receive',
      name: 'receive',
      component: () => import('./feedback/receive/index.vue'),
      meta: {
        title: '接收'
      }
    },
    {
      path: '/mes/feedback/processing',
      name: 'processing',
      component: () => import('./feedback/processing/index.vue'),
      meta: {
        title: '加工',
      }
    },
    {
      path: '/mes/finished-product',
      name: 'finished-product',
      component: () => import('./finishe-product/index.vue'),
      meta: {
        title: '成品入库',
      }
    },
    {
      path: '/mes/picking',
      name: 'picking',
      component: () => import('./picking/index.vue'),
      meta: {
        title: '生产领料',
      }
    },
    // {
    //   path: '/mes/feedback/send',
    //   name: 'send',
    //   component: () => import('./feedback/send/index.vue'),
    //   meta: {
    //     title: '发送'
    //   }
    // },
  ]
}

export default [mesRoute, feedback];
